package omg.ligong.db;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;

public class PooledStatement implements Statement {
	private PooledConnection conn;
	private Statement stmt;

	public PooledStatement(PooledConnection conn, Statement stmt) {
		this.conn = conn;
		this.stmt = stmt;
	}

	public void addBatch(String sql) throws SQLException {
		stmt.addBatch(sql);
	}

	public void cancel() throws SQLException {
		stmt.cancel();
	}

	public void clearBatch() throws SQLException {
		stmt.clearBatch();

	}

	public void clearWarnings() throws SQLException {
		stmt.clearWarnings();
	}

	public void close() throws SQLException {
		stmt.close();
	}

	public boolean execute(String sql) throws SQLException {
		return stmt.execute(sql);
	}

	public boolean execute(String sql, int autoGeneratedKeys)
			throws SQLException {

		return stmt.execute(sql, autoGeneratedKeys);
	}

	public boolean execute(String sql, int[] columnIndexes) throws SQLException {

		return stmt.execute(sql, columnIndexes);
	}

	public boolean execute(String sql, String[] columnNames)
			throws SQLException {
		return stmt.execute(sql, columnNames);
	}

	public int[] executeBatch() throws SQLException {
		return stmt.executeBatch();
	}

	public ResultSet executeQuery(String sql) throws SQLException {
		return stmt.executeQuery(sql);
	}

	public int executeUpdate(String sql) throws SQLException {
		return stmt.executeUpdate(sql);
	}

	public int executeUpdate(String sql, int autoGeneratedKeys)
			throws SQLException {
		return stmt.executeUpdate(sql);
	}

	public int executeUpdate(String sql, int[] columnIndexes)
			throws SQLException {
		return stmt.executeUpdate(sql, columnIndexes);
	}

	public int executeUpdate(String sql, String[] columnNames)
			throws SQLException {
		return stmt.executeUpdate(sql, columnNames);
	}

	public Connection getConnection() throws SQLException {
		return this.conn;
	}

	public int getFetchDirection() throws SQLException {
		return stmt.getFetchDirection();
	}

	public int getFetchSize() throws SQLException {
		return stmt.getFetchSize();
	}

	public ResultSet getGeneratedKeys() throws SQLException {
		return stmt.getGeneratedKeys();
	}

	public int getMaxFieldSize() throws SQLException {
		return stmt.getMaxFieldSize();
	}

	public int getMaxRows() throws SQLException {
		return stmt.getMaxRows();
	}

	public boolean getMoreResults() throws SQLException {
		return stmt.getMoreResults();
	}

	public boolean getMoreResults(int current) throws SQLException {
		return stmt.getMoreResults(current);
	}

	public int getQueryTimeout() throws SQLException {
		return stmt.getQueryTimeout();
	}

	public ResultSet getResultSet() throws SQLException {
		return stmt.getResultSet();
	}

	public int getResultSetConcurrency() throws SQLException {
		return stmt.getResultSetConcurrency();
	}

	public int getResultSetHoldability() throws SQLException {
		return stmt.getResultSetHoldability();
	}

	public int getResultSetType() throws SQLException {
		return stmt.getResultSetType();
	}

	public int getUpdateCount() throws SQLException {
		return stmt.getUpdateCount();
	}

	public SQLWarning getWarnings() throws SQLException {
		return stmt.getWarnings();
	}

	public void setCursorName(String name) throws SQLException {
		stmt.setCursorName(name);
	}

	public void setEscapeProcessing(boolean enable) throws SQLException {
		stmt.setEscapeProcessing(enable);
	}

	public void setFetchDirection(int direction) throws SQLException {
		stmt.setFetchDirection(direction);
	}

	public void setFetchSize(int rows) throws SQLException {
		stmt.setFetchSize(rows);
	}

	public void setMaxFieldSize(int max) throws SQLException {
		stmt.setMaxFieldSize(max);
	}

	public void setMaxRows(int max) throws SQLException {
		stmt.setMaxRows(max);
	}

	public void setQueryTimeout(int seconds) throws SQLException {
		stmt.setQueryTimeout(seconds);
	}

}
